﻿
using System;
using System.Xml;
using System.Xml.Serialization;

namespace Sueetie.Core
{

    /// <summary>
    /// This object represents the properties and methods of a z_sueetie_vw_user.
    /// </summary>
    [Serializable]
    public class SueetieUser
    {

        public SueetieUser()
        {
        }

        public int UserID { get; set; }
        public Guid MembershipID { get; set; }
        public string UserName { get; set; }
        public string Email { get; set; }
        public byte[] AvatarImage { get; set; }
        public string AvatarImageType { get; set; }


        public SueetieUserProfile Profile
        {
            get
            {
                return SueetieContext.Current.UserProfile;
            }
        }

        public bool HasAvatarImage
        {
            get
            {
                bool hasImage = true;

                if (this.AvatarImage == null || this.IsAnonymous)
                {
                    hasImage = false;
                }

                return hasImage;
            }
        }

        public bool IsAnonymous
        {
            get
            {
                bool isAnonymous = true;
                if (this.UserID > 0)
                    isAnonymous = false;
                return isAnonymous;

            }
        }
    }

}

